<div class="esriAnalysis">
    <div data-dojo-type="dijit/layout/ContentPane" style="margin-top:0.5em; margin-bottom: 0.5em;">
      <div data-dojo-attach-point="_aggregateToolContentTitle" class="analysisTitle">
        <table class="esriFormTable" > 
          <tr>
            <td class="esriToolIconTd"><div class="aggregateIcon"></div></td>
            <td class="esriAlignLeading esriAnalysisTitle" data-dojo-attach-point="_toolTitle">
              <label data-dojo-attach-point="_titleLbl">${i18n.aggregatePoints}</label>
              <nav class="breadcrumbs"  data-dojo-attach-point="_analysisModeLblNode" style="display:none;">
                <a href="#" class="crumb breadcrumbs__modelabel" data-dojo-attach-event="onclick:_handleModeCrumbClick" data-dojo-attach-point="_analysisModeCrumb"></a>
                <a href="#" class="crumb is-active" data-dojo-attach-point="_analysisTitleCrumb" style="font-size:16px;">${i18n.aggregatePoints}</a>
              </nav>              
            </td>
            <td>
              <div class="esriFloatTrailing" style="padding:0;">
                  <div class="esriFloatLeading" data-dojo-attach-point="_toolDescHelpDiv">
                    <a href="#" class='esriFloatLeading helpIcon' esriHelpTopic="toolDescription"></a>
                  </div>
                  <div class="esriFloatTrailing">
                    <a href="#" data-dojo-attach-point="_closeBtn" title="${i18n.close}" class="esriAnalysisCloseIcon"></a>
                  </div>              
              </div>                
            </td>
          </tr>
        </table>
      </div>
      <div class="toolHeaderLine"></div>
    </div>
    <div data-dojo-type="dijit/form/Form" data-dojo-attach-point="_form" readOnly="true">
      <table class="esriFormTable"  data-dojo-attach-point="_aggregateTable"  style="border-collapse:collapse;border-spacing:5px;" cellpadding="5px" cellspacing="5px"> 
         <tbody>
          <tr data-dojo-attach-point="_titleRow">
            <td  colspan="3" class="sectionHeader" data-dojo-attach-point="_aggregateToolDescription" >${i18n.aggregateDefine}</td>
          </tr> 
          <tr data-dojo-attach-point="_analysisLabelRow" style="display:none;">
            <td colspan="2" style="padding-bottom:0;">
              <label class="esriFloatLeading  esriTrailingMargin025 esriAnalysisNumberLabel">${i18n.oneLabel}</label>
              <label class="esriAnalysisStepsLabel">${i18n.analysisLayerLabel}</label>
            </td>
            <td class="shortTextInput" style="padding-bottom:0;">
              <a href="#" class='esriFloatTrailing helpIcon' esriHelpTopic="pointLayer"></a>
            </td>
          </tr>
          <tr data-dojo-attach-point="_selectAnalysisRow" style="display:none;">
            <td  colspan="3" style="padding-top:0;">
              <select class="esriLeadingMargin1 longInput esriLongLabel"  style="margin-top:1.0em;" data-dojo-type="dijit/form/Select" data-dojo-attach-point="_analysisSelect" data-dojo-attach-event="onChange:_handleAnalysisLayerChange"></select>
            </td>
          </tr>
          <tr>
            <td colspan="2" style="padding-bottom:0;">
              <label class="esriFloatLeading  esriTrailingMargin025 esriAnalysisNumberLabel">${i18n.oneLabel}</label>
              <label class="esriAnalysisStepsLabel" data-dojo-attach-point="_chooseAggLabel">${i18n.chooseAreaLabel}</label>
           </td>
           <td class="shortTextInput" style="padding-bottom:0;">  
              <a href="#" class='esriFloatTrailing helpIcon' data-dojo-attach-point="_chooseAggHelp" esriHelpTopic="polygonLayer"></a>
            </td>
          </tr>
          <tr data-dojo-attach-point="_binTypeRow">
            <td data-dojo-attach-point="bufTypeTd" colspan="2">
              <table style="width:100%">
                <tr>
                  <td>
                    <div class="bufferSelector selected" data-dojo-attach-point="_polygon" >
                      <div class="bufferIcon polygonBinIcon"></div>
                      <div><label class="esriSelectLabel">${i18n.polygon}</label></div>
                    </div>
                  </td>
                  <td>
                    <div class="bufferSelector" data-dojo-attach-point="_square">
                      <div class="bufferIcon squareBinIcon"></div>
                      <div><label class="esriSelectLabel">${i18n.square}</label></div>
                    </div>
                  </td>
                  <td>
                    <div class="bufferSelector" data-dojo-attach-point="_hexagon">
                      <div class="bufferIcon hexagonBinIcon"></div>
                      <div><label class="esriSelectLabel">${i18n.hexagon}</label></div>
                    </div>
                  </td>                
                </tr>
              </table>
            </td>
          </tr>
          <tr data-dojo-attach-point="_chooseBinSizeLblRow">
            <td colspan="3" style="padding-top:0;padding-bottom:0">
              <label class="esriLeadingMargin1" data-dojo-attach-point="_binSizeLabel"></label>
            </td>
          </tr> 
          <tr data-dojo-attach-point="_binsTypeRow">
           <td style="padding-right:0;margin-top:1.0em;width:50%;">
              <input type="text" data-dojo-type="dijit/form/NumberTextBox" data-dojo-props="intermediateChanges:true,value:'5',required:false,missingMessage:'${i18n.distanceMsg}'" data-dojo-attach-point="_binsInput" class="esriLeadingMargin1"  style="width:75%;">
            </td>
            <td colspan="2" style="padding-left:0.25em;margin-top:1.0em;width:50%;">
              <select class="mediumInput esriAnalysisSelect" data-dojo-type="dijit/form/Select" data-dojo-attach-point="_binUnits" style="width:80%;table-layout:fixed;">
                 <option value="NauticalMiles">${i18n.nautMiles}</option>
                 <option value="Miles">${i18n.miles}</option>
                 <option value="Yards">${i18n.yards}</option>
                 <option value="Feet">${i18n.feet}</option>
                 <option type="separator"></option>
                 <option value="Kilometers">${i18n.kilometers}</option>
                 <option value="Meters">${i18n.meters}</option>
              </select>
            </td>
          </tr>
          <tr data-dojo-attach-point="_choosePolyLblRow">
            <td colspan="3" style="padding-top:0;padding-bottom:0">
              <label class="esriLeadingMargin1">${i18n.choosePolyLayer}</label>
            </td>
          </tr>            
          <tr data-dojo-attach-point="_polygonRow">
            <td colspan="3" style="padding-top:0;" data-dojo-attach-point="_layersRowTd">
              <select class="esriLeadingMargin1 longInput esriLongLabel"  style="margin-top:1.0em;" data-dojo-type="dijit/form/Select" data-dojo-attach-point="_layersSelect" data-dojo-props="required:true" data-dojo-attach-event="onChange:_handleLayerChange"></select>
            </td>
          </tr> 
          <tr>
         <tr data-dojo-attach-point="_keepPolygonsCheckRow">
           <td colspan="2">
             <label class="esriLeadingMargin2 esriSelectLabel">
               <div data-dojo-type="dijit/form/CheckBox" data-dojo-attach-point="_keepPolygonsCheck" data-dojo-props="checked:'true'"></div>
               ${i18n.keepPolygonLabel}
             </label>
           </td>
           <td class="shortTextInput">
              <a href="#" class='esriFloatTrailing helpIcon' esriHelpTopic="KeepBoundaryNoPoints"></a>
           </td>
          </tr>
          <tr>
            <td colspan="3" class="clear"></td>
          </tr>
          <tr data-dojo-attach-point="_timeStepsLabelRow">
            <td colspan="2">
              <label  data-dojo-attach-point="_timeStepLabelNo" class="esriFloatLeading esriTrailingMargin025 esriAnalysisNumberLabel">${i18n.twoLabel}</label>
              <label class="esriAnalysisStepsLabel">${i18n.aggTimeStepsLabel}</label>
            </td>
            <td class="shortTextInput">
              <a href="#" class='esriFloatTrailing helpIcon' esriHelpTopic="timeSlicing"></a> 
            </td>             
          </tr>
           <tr data-dojo-attach-point="_intervalLabelRow">
            <td colspan="2">
              <label class="esriLeadingMargin1">${i18n.intervalLabel}</label>
            </td>
           <td class="shortTextInput">
              <a href="#" class='esriFloatTrailing helpIcon' esriHelpTopic="timeInterval"></a> 
            </td>             
          </tr>           
         <tr data-dojo-attach-point="_intervalRow">
          <td style="padding-right:0;padding-bottom:0;width:50%;">
            <input type="text" data-dojo-type="dijit/form/NumberTextBox" data-dojo-props="constraints:{min:1,places:0},intermediateChanges:true,required:false,missingMessage:'${i18n.distanceMsg}'" data-dojo-attach-point="_timeIntervalInput" class="esriLeadingMargin1"  style="width:75%;">
          </td>
          <td colspan="2" style="padding-left:0.25em;padding-bottom:0;width:50%;">
            <select class="mediumInput esriAnalysisSelect" data-dojo-type="dijit/form/Select" data-dojo-attach-point="_timeIntervalUnits" style="width:80%;table-layout:fixed;">
               <option value="milliseconds">${i18n.milliseconds}</option>
               <option value="seconds">${i18n.seconds}</option>
               <option value="minutes">${i18n.minutes}</option>
               <option value="hours">${i18n.hours}</option>
               <option value="days">${i18n.days}</option>
               <option value="weeks">${i18n.weeks}</option>
               <option value="months">${i18n.months}</option>
               <option value="years">${i18n.years}</option>
            </select>
          </td>
        </tr>         
        <tr data-dojo-attach-point="_repeatLabelRow">
            <td colspan="2">
              <label class="esriLeadingMargin1">${i18n.repeatLabel}</label>
            </td>
            <td class="shortTextInput">
              <a href="#" class='esriFloatTrailing helpIcon' esriHelpTopic="timeStep"></a> 
            </td>          
        </tr>       
        <tr data-dojo-attach-point="_repeatRow">
          <td style="padding-right:0;padding-bottom:0;width:50%;">
            <input type="text" data-dojo-type="dijit/form/NumberTextBox" data-dojo-props="constraints:{min:1,places:0},intermediateChanges:true,required:false,missingMessage:'${i18n.distanceMsg}'" data-dojo-attach-point="_timeRepeatInput" class="esriLeadingMargin1"  style="width:75%;">
          </td>
          <td colspan="2" style="padding-left:0.25em;padding-bottom:0;width:50%;">
            <select class="mediumInput esriAnalysisSelect" data-dojo-type="dijit/form/Select" data-dojo-attach-point="_timeRepeatUnits" style="width:80%;table-layout:fixed;">
               <option value="milliseconds">${i18n.milliseconds}</option>
               <option value="seconds">${i18n.seconds}</option>
               <option value="minutes">${i18n.minutes}</option>
               <option value="hours">${i18n.hours}</option>
               <option value="days">${i18n.days}</option>
               <option value="weeks">${i18n.weeks}</option>
               <option value="months">${i18n.months}</option>
               <option value="years">${i18n.years}</option>
            </select>
          </td>
        </tr>            
        <tr data-dojo-attach-point="_timeLabelRow">
          <td colspan="2">
            <label class="esriLeadingMargin1">${i18n.timeRefLabel}</label>
          </td>
          <td class="shortTextInput">
            <a href="#" class='esriFloatTrailing helpIcon' esriHelpTopic="timeReference"></a> 
          </td>             
        </tr>
        <tr data-dojo-attach-point="_timeRefRow">
         <td style="padding-right:0;width:50%;padding-bottom:1em;">
            <input class="esriLeadingMargin1 esriAnalysisSelect" data-dojo-props="required:false" data-dojo-type="dijit/form/DateTextBox" data-dojo-attach-point="_timeRefDay" style="width:75%;">
          </input>
         </td>
         <td colpsan="2" style="padding-left:0.25em;width:50%;padding-bottom:1em;">   
          <input  type="text" data-dojo-type="dijit/form/TimeTextBox" data-dojo-props="required:false,intermediateChanges:true,constraints:{formatLength:'short',selector:'time'}"  data-dojo-attach-point="_timeRefTime" data-dojo-attach-event="onChange:_handleRefTimeChange" style="margin-top:0;width:90%;">
          </input>
        </td>
        </tr>        
        <tr>
          <td colspan="2">
            <label class="esriFloatLeading esriTrailingMargin025 esriAnalysisNumberLabel" data-dojo-attach-point="_statsNumLabel">${i18n.twoLabel}</label>
            <label class="esriAnalysisStepsLabel">${i18n.addStatsLabel}</label>
          </td>
          <td class="shortTextInput">
            <a href="#" class='esriFloatTrailing helpIcon' data-dojo-attach-point="_sumHelp" esriHelpTopic="SummaryFields"></a> 
          </td>             
        </tr>
        <!-- <tr>
          <td colspan="3">
            <tr data-dojo-type="esri/dijit/analysis/components/AddSummaryFields" data-dojo-attach-point="_summaryWidget" 
            data-dojo-props="layer:'', showGeoAnalyticsParams:${showGeoAnalyticsParams}, emptyValue:'', addAsRow:false"></span>
          </tr>
        </tr> -->
        <tr data-dojo-type="esri/dijit/analysis/components/AddSummaryFields" data-dojo-attach-point="_summaryWidget" 
        data-dojo-props="layer:'', showGeoAnalyticsParams:${showGeoAnalyticsParams}, addAsRow:true"></tr>
        <tr data-dojo-attach-point="_groupByLabelRow">
          <td colspan="2">
            <label data-dojo-attach-point="_groupByLabelNo" class="esriFloatLeading esriTrailingMargin025 esriAnalysisNumberLabel">${i18n.threeLabel}</label>
            <label class="esriAnalysisStepsLabel"  data-dojo-attach-point="_groupByLabel">${i18n.groupByLabel}</label>
          </td>
          <td class="shortTextInput">
            <a href="#" class='esriFloatTrailing helpIcon' esriHelpTopic="GroupByField"></a> 
          </td>             
        </tr>
        <tr data-dojo-attach-point="_groupBySelectRow">
          <td colspan="3">
            <select class="longInput esriLeadingMargin1" data-dojo-type="dijit.form.Select"  data-dojo-attach-point="_groupBySelect" data-dojo-attach-event="onChange:_handleGroupBySelectChange"></select>
          </td>                
        </tr>
        <tr data-dojo-attach-point="_minmajorityRow">
          <td colspan="2">
            <label class="esriLeadingMargin2 esriSelectLabel" data-dojo-attach-point="_minmajorityLabel">
              <div data-dojo-type="dijit/form/CheckBox" data-dojo-attach-point="_minmajorityCheck" data-dojo-props="checked:false"></div>
              ${i18n.addMinMajorityLable}
            </label>
          </td>
          <td class="shortTextInput">
            <a href="#" class='esriFloatTrailing helpIcon' esriHelpTopic="MinorityMajority"></a>
          </td>
        </tr>    
        <tr data-dojo-attach-point="_percentPointsRow">
          <td colspan="2">
            <label class="esriLeadingMargin2 esriSelectLabel" data-dojo-attach-point="_percentPointsLabel">
              <div data-dojo-type="dijit/form/CheckBox" data-dojo-attach-point="_percentPointsCheck" data-dojo-props="checked:false"></div>
              ${i18n.addPercentageLabel}
            </label>
          </td>
          <td class="shortTextInput">
            <a href="#" class='esriFloatTrailing helpIcon' esriHelpTopic="PercentPoints"></a>
          </td>
        </tr>    
          
        <tr>
          <td colspan="3" class="clear"></td>
        </tr>
        <!-- <tr data-dojo-attach-point="_srLabelRow">
          <td colspan="2">
            <label class="esriFloatLeading esriTrailingMargin025 esriAnalysisNumberLabel" data-dojo-attach-point="_spatialRefLabel">${i18n.fourLabel}</label>
            <label class="esriAnalysisStepsLabel">${i18n.spatialReference}</label>
          </td>
          <td class="shortTextInput">
            <a href="#" class='esriFloatTrailing helpIcon' esriHelpTopic="spatialReference"></a> 
          </td>             
        </tr>
        <tr data-dojo-attach-point="_srInputRow">
          <td colspan="3">
            <input type="text" data-dojo-type="dijit/form/ValidationTextBox" class="esriLeadingMargin1 longInput" data-dojo-props="trim:true" data-dojo-attach-point="_spatialRefInput" value=""></input>
          </td>                
        </tr>-->
        <tr data-dojo-attach-point="_datastoreLabelRow">
          <td colspan="2">
            <label class="esriFloatLeading esriTrailingMargin025 esriAnalysisNumberLabel" data-dojo-attach-point="_datastoreLabel">${i18n.fiveLabel}</label>
            <label class="esriAnalysisStepsLabel">${i18n.datastoreLabel}</label>
          </td>
          <td class="shortTextInput">
            <a href="#" class='esriFloatTrailing helpIcon' esriHelpTopic="dataStore"></a> 
          </td>            
        </tr>
        <tr data-dojo-attach-point="_selectDataStore">
          <td  colspan="3" class="padTop0">
            <select class="esriLeadingMargin1 longInput esriLongLabel"  style="margin-top:1.0em;" data-dojo-type="dijit/form/Select" data-dojo-attach-point="_datastoreSelect">
              <option value="relational">${i18n.relationalDS}</option>
              <option value="spatialtemporal" selected="true">${i18n.spatialDS}</option>
            </select>
          </td>
        </tr>        
        <tr>
          <td colspan="2">
            <label class="esriFloatLeading esriTrailingMargin025 esriAnalysisNumberLabel" data-dojo-attach-point="_outputNumLabel">${i18n.sixLabel}</label>
            <label class="esriAnalysisStepsLabel">${i18n.outputLayerLabel}</label>
          </td>
          <td class="shortTextInput">
            <a href="#" class='esriFloatTrailing helpIcon' data-dojo-attach-point="_outputHelp" esriHelpTopic="OutputLayer"></a> 
          </td>             
        </tr>
        <tr>
          <td colspan="3">
            <input type="text" data-dojo-type="dijit/form/ValidationTextBox" class="esriLeadingMargin1 longInput" data-dojo-props="trim:true,required:true" data-dojo-attach-point="_outputLayerInput" value=""></input>
          </td>                
        </tr>
        <tr>
          <td colspan="3">
              <div class="esriLeadingMargin1" data-dojo-attach-point="_chooseFolderRow">
                <label style="width:9px;font-size:smaller;">${i18n.saveResultIn}</label>
                <input class="longInput esriFolderSelect" data-dojo-attach-point="_webMapFolderSelect" dojotype="dijit/form/FilteringSelect" trim="true"></input>
              </div>              
          </td>
        </tr>
        </tbody>         
       </table>
     </div>
    <div data-dojo-attach-point="_aggregateToolContentButtons" style="padding:5px;margin-top:5px;border-top:solid 1px #BBB;">
      <div class="esriFormWarning esriRoundedBox" data-dojo-attach-point="_errorMessagePane" style="display:none;">
        <a href="#" title="${i18n.close}" class="esriFloatTrailing esriAnalysisCloseIcon" data-dojo-attach-event="onclick:_handleCloseMsg"></a>
        <span data-dojo-attach-point="_bodyNode"></span>
      </div>
      <div class="esriExtentCreditsCtr">
        <a class="esriFloatTrailing esriSmallFont"  href="#" data-dojo-attach-point="_showCreditsLink">${i18n.showCredits}</a>
       <label data-dojo-attach-point="_chooseExtentDiv" class="esriSelectLabel esriExtentLabel">
         <input type="radio" data-dojo-attach-point="_useExtentCheck" data-dojo-type="dijit/form/CheckBox" data-dojo-props="checked:true" name="extent" value="true"/>
           ${i18n.useMapExtent}
       </label>
      </div>
      <button data-dojo-type="dijit/form/Button" type="submit" data-dojo-attach-point="_saveBtn" class="esriLeadingMargin4 esriAnalysisSubmitButton" data-dojo-attach-event="onClick:_handleSaveBtnClick">
          ${i18n.runAnalysis}
      </button>
    </div>
    <div data-dojo-type="dijit/Dialog" title="${i18n.creditTitle}" data-dojo-attach-point="_usageDialog" style="width:40em;">
      <div data-dojo-type="esri/dijit/analysis/CreditEstimator"  data-dojo-attach-point="_usageForm"></div>
    </div>    
  </div>
